package cn.itsource.ymcc.service.impl;

import cn.itsource.ymcc.domain.Teacher;
import cn.itsource.ymcc.mapper.TeacherMapper;
import cn.itsource.ymcc.service.ITeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 老师表 服务实现类
 * </p>
 *
 * @author cff
 * @since 2024-06-11
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {

    @Override
    public void patchdel(Long[] ids) {
        //将Long类型数组转换为Collection<Long>
        List<Long> idList = Arrays.asList(ids);
        Collection<Long> idCollection = idList.stream().collect(Collectors.toList());
        super.removeByIds(idCollection);
    }
}
